home *** CD-ROM | disk | FTP | other *** search
/ CD Fun House 1 / CD Fun House (Wayzata Technology).iso / •The Arcade• / Sword Play ••• / Sword Play еее / card_4813.txt < prev    next >
Text File  |  1990-10-02  |  10KB  |  483 lines

  1. -- card: 4813 from stack: in
  2. -- bmap block id: 5968
  3. -- flags: 4000
  4. -- background id: 2143
  5. -- name: Figure Attack
  6. ----- HyperTalk script -----
  7. on openCard
  8.   global YourOff
  9.   global YourDef
  10.   global YourHP
  11.   global OppOff
  12.   global OppDef
  13.   global OppHp
  14.   global MissedAttack
  15.   global WentHelp
  16.  
  17.   if not WentHelp then
  18.     subtract 2 from YourHP
  19.  
  20.     if not MissedAttack then
  21.       put YourOff into it
  22.       add 1 to it
  23.       put line it of card field "Offenses" into it
  24.       put "You swing with a " & it into card field "YourAttack"
  25.  
  26.       put YourDef into it
  27.       add 1 to it
  28.       put line it of card field "Defenses" into it
  29.       put "You set your shield " & it into card field "YourDefense"
  30.     else
  31.       put "You forget to attack" into card field "YourAttack"
  32.       put "You forget to defend" into card field "YourDefense"
  33.     end if
  34.  
  35.     subtract 2 from OppHP
  36.  
  37.     put random(6) into OppOff
  38.     put WhichDefense(OppOff) into OppDef
  39.  
  40.     put OppOff into it
  41.     add 1 to it
  42.     put line it of card field "Offenses" into it
  43.     put "Your foe tries a " & it into card field "OppAttack"
  44.  
  45.     put OppDef into it
  46.     add 1 to it
  47.     put line it of card field "Defenses" into it
  48.     put "Your foe uses a shield " & it into card field "OppDefense"
  49.  
  50.     if not MissedAttack then
  51.       put TheResult(YourOff,OppDef) into it
  52.     else
  53.       put 0 into it
  54.     end if
  55.     if it = 1 then
  56.       put "You hit your foe!" into card field "Your Result"
  57.     else
  58.       if it = .5 then
  59.         put "You glance your foe" into card field "Your Result"
  60.       else
  61.         put "You miss" into card field "Your Result"
  62.       end if
  63.     end if
  64.  
  65.     put Round(it * random(20) * YourHP / 100) into OppDamage
  66.  
  67.     if not MissedAttack then
  68.       put TheResult(OppOff,YourDef) into it
  69.     else
  70.       put 1 into it
  71.     end if
  72.     if it = 1 then
  73.       put "Your foe hits you!" into card field "Opp Result"
  74.     else
  75.       if it = .5 then
  76.         put "Your foe glances you" into card field "Opp Result"
  77.       else
  78.         put "Your foe misses" into card field "Opp Result"
  79.       end if
  80.     end if
  81.  
  82.     put Round(it * random(20) * OppHP / 100) into YourDamage
  83.  
  84.     subtract YourDamage from YourHP
  85.     subtract OppDamage from OppHP
  86.  
  87.     If YourHP <= 0 then
  88.       put "You die" into card field "Your Special"
  89.     else
  90.       if YourHP <= 20 then
  91.         put "You feel weak" into card field "Your Special"
  92.       end if
  93.     end if
  94.     If OppHP <= 0 then
  95.       put "Your foe dies" into card field "Opp Special"
  96.     else
  97.       if OppHP <= 20 then
  98.         put "Your foe seems weak" into card field "Opp Special"
  99.       end if
  100.     end if
  101.   end if
  102.  
  103.   put false into WentHelp
  104. end openCard
  105.  
  106. function TheResult o,d
  107. put o into io
  108. add 1 to io
  109. put d into id
  110. add 1 to id
  111. return word id of line io of card field "Results"
  112. end TheResult
  113.  
  114. function WhichDefense x
  115. if x > 2 then
  116.   put random(9) into def
  117. else
  118.   if x = 1 then
  119.     put random(3) into it
  120.     if it = 1 then
  121.       put 1 into def
  122.     else
  123.       if it = 2 then
  124.         put 4 into def
  125.       else
  126.         put 7 into def
  127.       end if
  128.     end if
  129.   else
  130.     put random(6) into it
  131.     if it = 1 then
  132.       put 1 into def
  133.     else
  134.       if it = 2 then
  135.         put 2 into def
  136.       else
  137.         if it = 3 then
  138.           put 4 into def
  139.         else
  140.           if it = 4 then
  141.             put 5 into def
  142.           else
  143.             if it = 5 then
  144.               put 7 into def
  145.             else
  146.               put 8 into def
  147.             end if
  148.           end if
  149.         end if
  150.       end if
  151.     end if
  152.   end if
  153. end if
  154.  
  155. return def
  156. end WhichDefense
  157.  
  158.  
  159.  
  160. -- part 1 (field)
  161. -- low flags: 01
  162. -- high flags: 0000
  163. -- rect: left=1 top=89 right=109 bottom=248
  164. -- title width / last selected line: 0
  165. -- icon id / first selected line: 0 / 0
  166. -- text alignment: 1
  167. -- font id: 5
  168. -- text size: 14
  169. -- style flags: 0
  170. -- line height: 18
  171. -- part name: YourAttack
  172.  
  173.  
  174. -- part 2 (field)
  175. -- low flags: 01
  176. -- high flags: 0000
  177. -- rect: left=1 top=109 right=129 bottom=248
  178. -- title width / last selected line: 0
  179. -- icon id / first selected line: 0 / 0
  180. -- text alignment: 1
  181. -- font id: 5
  182. -- text size: 14
  183. -- style flags: 0
  184. -- line height: 18
  185. -- part name: YourDefense
  186.  
  187.  
  188. -- part 3 (field)
  189. -- low flags: 01
  190. -- high flags: 0000
  191. -- rect: left=251 top=89 right=109 bottom=510
  192. -- title width / last selected line: 0
  193. -- icon id / first selected line: 0 / 0
  194. -- text alignment: 1
  195. -- font id: 5
  196. -- text size: 14
  197. -- style flags: 0
  198. -- line height: 18
  199. -- part name: OppAttack
  200.  
  201.  
  202. -- part 4 (field)
  203. -- low flags: 01
  204. -- high flags: 0000
  205. -- rect: left=251 top=109 right=129 bottom=510
  206. -- title width / last selected line: 0
  207. -- icon id / first selected line: 0 / 0
  208. -- text alignment: 1
  209. -- font id: 5
  210. -- text size: 14
  211. -- style flags: 0
  212. -- line height: 18
  213. -- part name: OppDefense
  214.  
  215.  
  216. -- part 7 (field)
  217. -- low flags: 01
  218. -- high flags: 0000
  219. -- rect: left=22 top=198 right=218 bottom=212
  220. -- title width / last selected line: 0
  221. -- icon id / first selected line: 0 / 0
  222. -- text alignment: 1
  223. -- font id: 5
  224. -- text size: 14
  225. -- style flags: 0
  226. -- line height: 18
  227. -- part name: Your Result
  228.  
  229.  
  230. -- part 8 (field)
  231. -- low flags: 01
  232. -- high flags: 0000
  233. -- rect: left=22 top=218 right=256 bottom=212
  234. -- title width / last selected line: 0
  235. -- icon id / first selected line: 0 / 0
  236. -- text alignment: 1
  237. -- font id: 5
  238. -- text size: 14
  239. -- style flags: 0
  240. -- line height: 18
  241. -- part name: Your Special
  242.  
  243.  
  244. -- part 9 (field)
  245. -- low flags: 01
  246. -- high flags: 0000
  247. -- rect: left=276 top=198 right=218 bottom=467
  248. -- title width / last selected line: 0
  249. -- icon id / first selected line: 0 / 0
  250. -- text alignment: 1
  251. -- font id: 5
  252. -- text size: 14
  253. -- style flags: 0
  254. -- line height: 18
  255. -- part name: Opp Result
  256.  
  257.  
  258. -- part 11 (field)
  259. -- low flags: 01
  260. -- high flags: 0000
  261. -- rect: left=276 top=218 right=256 bottom=467
  262. -- title width / last selected line: 0
  263. -- icon id / first selected line: 0 / 0
  264. -- text alignment: 1
  265. -- font id: 5
  266. -- text size: 14
  267. -- style flags: 0
  268. -- line height: 18
  269. -- part name: Opp Special
  270.  
  271.  
  272. -- part 12 (button)
  273. -- low flags: 00
  274. -- high flags: 0000
  275. -- rect: left=82 top=289 right=332 bottom=144
  276. -- title width / last selected line: 0
  277. -- icon id / first selected line: 0 / 0
  278. -- text alignment: 1
  279. -- font id: 0
  280. -- text size: 12
  281. -- style flags: 0
  282. -- line height: 16
  283. -- part name: 
  284. ----- HyperTalk script -----
  285. on mouseUp
  286.   global WentHelp
  287.  
  288.   put true into WentHelp
  289.  
  290.   push this card
  291.   visual effect iris open slowly
  292.   go to card "Sword Play Help Index"
  293. end mouseUp
  294.  
  295.  
  296.  
  297. -- part 13 (button)
  298. -- low flags: 00
  299. -- high flags: 0000
  300. -- rect: left=340 top=289 right=332 bottom=419
  301. -- title width / last selected line: 0
  302. -- icon id / first selected line: 0 / 0
  303. -- text alignment: 1
  304. -- font id: 0
  305. -- text size: 12
  306. -- style flags: 0
  307. -- line height: 16
  308. -- part name: 
  309. ----- HyperTalk script -----
  310. on mouseUp
  311.   global WentHelp
  312.  
  313.   put true into WentHelp
  314.  
  315.   push this card
  316.   visual effect iris open slowly
  317.   go to card "Result Help Start"
  318. end mouseUp
  319.  
  320.  
  321.  
  322. -- part 15 (button)
  323. -- low flags: 00
  324. -- high flags: 0000
  325. -- rect: left=193 top=260 right=309 bottom=301
  326. -- title width / last selected line: 0
  327. -- icon id / first selected line: 0 / 0
  328. -- text alignment: 1
  329. -- font id: 0
  330. -- text size: 12
  331. -- style flags: 0
  332. -- line height: 16
  333. -- part name: 
  334. ----- HyperTalk script -----
  335. on mouseUp
  336.   global YourHP
  337.   global OppHP
  338.  
  339.   put "" into card field "YourAttack"
  340.   put "" into card field "YourDefense"
  341.   put "" into card field "Your Result"
  342.   put "" into card field "Your Special"
  343.   put "" into card field "OppAttack"
  344.   put "" into card field "OppDefense"
  345.   put "" into card field "Opp Result"
  346.   put "" into card field "Opp Special"
  347.  
  348.   If (YourHP <= 0) and (OppHP <= 0) Then
  349.     go to card "Both Dead"
  350.   else
  351.     If YourHP <= 0 Then
  352.       go to card "Player Dead"
  353.     else
  354.       if OppHP <= 0 Then
  355.         go to card "Win Certificate"
  356.       else
  357.         go to card "Off/Def"
  358.       end if
  359.     end if
  360.   end if
  361. end mouseUp
  362.  
  363.  
  364.  
  365.  
  366. -- part 16 (button)
  367. -- low flags: 00
  368. -- high flags: 0000
  369. -- rect: left=176 top=317 right=341 bottom=312
  370. -- title width / last selected line: 0
  371. -- icon id / first selected line: 0 / 0
  372. -- text alignment: 1
  373. -- font id: 0
  374. -- text size: 12
  375. -- style flags: 0
  376. -- line height: 16
  377. -- part name: 
  378. ----- HyperTalk script -----
  379. on mouseUp
  380.   global YourHP
  381.   global OppHP
  382.  
  383.   put "" into card field "YourAttack"
  384.   put "" into card field "YourDefense"
  385.   put "" into card field "Your Result"
  386.   put "" into card field "Your Special"
  387.   put "" into card field "OppAttack"
  388.   put "" into card field "OppDefense"
  389.   put "" into card field "Opp Result"
  390.   put "" into card field "Opp Special"
  391.  
  392.  
  393.   If (YourHP <= 0) and (OppHP <= 0) Then
  394.     go to card "Both Dead"
  395.   else
  396.     If YourHP <= 0 Then
  397.       go to card "Player Dead"
  398.     else
  399.       if OppHP <= 0 Then
  400.         go to card "Win Certificate"
  401.       else
  402.         go to card "Player Status"
  403.       end if
  404.     end if
  405.   end if
  406. end mouseUp
  407.  
  408.  
  409.  
  410. -- part 17 (field)
  411. -- low flags: 01
  412. -- high flags: 0000
  413. -- rect: left=49 top=28 right=40 bottom=61
  414. -- title width / last selected line: 0
  415. -- icon id / first selected line: 0 / 0
  416. -- text alignment: 0
  417. -- font id: 3
  418. -- text size: 12
  419. -- style flags: 0
  420. -- line height: 16
  421. -- part name: Offenses
  422.  
  423.  
  424. -- part 18 (field)
  425. -- low flags: 01
  426. -- high flags: 0000
  427. -- rect: left=66 top=28 right=40 bottom=78
  428. -- title width / last selected line: 0
  429. -- icon id / first selected line: 0 / 0
  430. -- text alignment: 0
  431. -- font id: 3
  432. -- text size: 12
  433. -- style flags: 0
  434. -- line height: 16
  435. -- part name: Defenses
  436.  
  437.  
  438. -- part 19 (field)
  439. -- low flags: 01
  440. -- high flags: 0000
  441. -- rect: left=83 top=28 right=40 bottom=95
  442. -- title width / last selected line: 0
  443. -- icon id / first selected line: 0 / 0
  444. -- text alignment: 0
  445. -- font id: 3
  446. -- text size: 12
  447. -- style flags: 0
  448. -- line height: 16
  449. -- part name: Results
  450.  
  451.  
  452. -- part contents for card part 17
  453. ----- text -----
  454.  
  455. Cut Right
  456. Cut Center
  457. Cut Left
  458. Sweep High
  459. Sweep Mid
  460. Sweep Low
  461.  
  462. -- part contents for card part 18
  463. ----- text -----
  464.  
  465. High Left
  466. High Center
  467. High Right
  468. Mid Left
  469. Mid Center
  470. Mid Right
  471. Low Left
  472. Low Center
  473. Low Right
  474.  
  475. -- part contents for card part 19
  476. ----- text -----
  477.    SHL SHC SHR SML SMC SMR SLL SLC SLR
  478. CL .5  0   0   1   .5  0   1   1   .5
  479. CC 0   0   0   .5  0   .5  1   .5  1
  480. CR 0   0   .5  0   .5  1   .5  1   1
  481. SH 0   0   .5  0   .5  1   .5  1   1
  482. SM 0   .5  1   0   0   .5  0   .5  1
  483. SL .5  1   1   0   .5  1   0   0   .5